<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  
</head>
<body>
  <div id="app">
    <div class="floor" v-for="(floor,index) in floors">
      <h2>
        {{ floor.title }}
      </h2>
      <ul>
        <li v-for="(item,index2) in floor.items">
          <h5>{{ item.name }}</h5>
          <p>{{item.price}}</p>
        </li>
      </ul>
    </div>
  </div>
  <script src="./vue.js"></script>
  <script>

    const vm = new Vue({
      el: '#app',
      data: {
       floors:[
         {
           title:"手机",
           items: [
             {
               name:"商品1",
               price: 10
             },
             {
               name:"商品2",
               price: 30
             },{
               name:"商品3",
               price: 40
             },{
               name:"商品4",
               price: 10
             }
           ]
         },
         {
           title:"电视",
           items: [
             {
               name:"商品1",
               price: 10
             },
             {
               name:"商品2",
               price: 30
             },{
               name:"商品3",
               price: 40
             },{
               name:"商品4",
               price: 10
             }
           ]
         },
         {
           title:"笔记本",
           items: [
             {
               name:"商品1",
               price: 10
             },
             {
               name:"商品2",
               price: 30
             },{
               name:"商品3",
               price: 40
             },{
               name:"商品4",
               price: 10
             }
           ]
         }
       ]
      },
      methods: {
        removeLi(i){
          this.arr.splice(i, 1);
        }
      }
    })
    // btn.addEventListener('事件',回调函数,[false/true])
  </script>
</body>
</html>